# Title     : TODO
# Objective : TODO
# Created by: Administrator
# Created on: 2020/10/14 0014
#pacman::p_load(ggpubr)
#set.seed(100)
#boy <- runif(20,min=170,max=180)
#girl <- runif(20,min=150,max=175)
#
#t.test(boy,girl)
#
#mydata <- data.frame(group = rep(c("boy","girl"),each=20),value=c(boy,girl))
#
#com1 <- compare_means( value~ group , data = mydata, method = "t.test")
#p <- ggboxplot(mydata, x="group", y = "value", color = "group", palette = "jco", add = "jitter",  short.panel.labs = FALSE)
#p <- p + stat_compare_means(method = "wilcox.test",label.y=200)
#p
has_rownames(mtcars)
has_rownames(iris)

# Remove row names ----------------------------------------------------
remove_rownames(mtcars) %>% has_rownames()

# Convert between row names and column --------------------------------
mtcars_tbl <- rownames_to_column(mtcars, var = "car") %>% as_tibble()
head(mtcars_tbl)
dd <- column_to_rownames(mtcars_tbl, var = "car")